<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>函数的奇思妙想</title>
</head>
<body>
    

    <script>
    
        {
            function fn (a) {
                var a = 10;

                function a () {
                    alert(1);
                }

                console.log(a);
            }

            fn(1000);

        }

        {
            /* var fn = function () {
                console.log('fn');
            } */

            function fn () {
                console.log('fn fn');
            }

            fn();
        }
    

        {
           function F () {
                return this;
           
           }

           let f1 = new F;

           let f2 = new F();

           console.log('f1',f1);
           console.log('f2',f2);
        }
    </script>

</body>
</html>